package edu.hm.devcamp.communication.xmlparser;


import java.io.InputStream;
import java.util.List;

import android.util.Log;
import android.util.Xml;
import edu.hm.devcamp.providers.Poi;

public class ModgyXmlParser{

	
	    
		
		public static List<Poi> parse(InputStream inputStream) {
			
			ModgyHandler handler = new ModgyHandler();
			try{	
//				URL url = new URL("http://api.mux.de/bibliothek.xml");
//				inputStream = url.openStream();
				Xml.parse(inputStream, Xml.Encoding.UTF_8, handler);
				
				
			} catch (Exception e){
				Log.e("Assuming Modgy XML Data", "Exception getting XML data", e);
			}
			
			return handler.getPOIs();
		}

	}
	


